/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package fmsactionserver.server.logger.logevent;

import java.util.ArrayList;

/**
 *
 * @author rbs
 */
public class InputEventMulticaster implements InputListener{
    
    protected ArrayList<InputListener> listener = new ArrayList<InputListener>();
  
    public void remove(InputListener l) {
      listener.remove(l);
    }
  
    @Override
    public void onEvent(InputEvent e) {
      for(int i=0; i < listener.size(); i++)
        ((InputListener)listener.get(i)).onEvent(e);
    }
  

    public void add(InputListener a) {
      if(! listener.contains(a))
        listener.add(a);
    }


}
